Bij de digitale balie
echo "
"; require_once("../../../conv.php"); ?>
>
>
>
>
>
>
>
> $invr_bzv1=strtolower($invr_bzv1); $datm=date("Y-m-d H:i:s", time()); echo "
".$datm; $invr_vndg=$datm; set_time_limit(0); // error_reporting(0); $ntrg=0; set_time_limit(0); // error_reporting(0); echo "
"; echo "
EDDY
Speak to me and have me learn a few things
Поговорите с Эдди и попросите его узнать несколько вещей
"; // echo "
INVR FUNC". $invr_func; // echo "
INVR BZV1". $invr_bzv1; // echo "
INVR BZV2". $invr_bzv2; if ($invr_func== "lnks") { $invr_func="rchs"; $invr_bzkr="gast"; } else { $invr_func="lnks"; $invr_bzkr="gesprekspartner"; } $invr_bzv1=str_replace("+"," ",$invr_bzv1); $sinvr_bzv1=str_replace(" ","+",$invr_bzv1); $invr_bzv2=str_replace("+"," ",$invr_bzv2); $sinvr_bzv2=str_replace(" ","+",$invr_bzv2); // echo "
INVR VGPT ".$invr_vgpt; echo "
Beste bezoeker praat met Eddy en leert hem natuurlijk praten.
"; $ntrg=0; set_time_limit(0); // error_reporting(0); echo "
"; echo "
SPREKER
Converse with a chatbot. Huidige gesprekspartner is ".$invr_vgpt."
"; # Semanta adaption require_once ("../../../xtrt-aiml-func.php"); require_once ("../../../chbt-date-func.php"); include ("../../../config-smta.php"); require_once ("../../../xtrt-xxxx-func.php"); require_once ("../../../bepl-sgmt-func.php"); require_once ("../../../bepl-spec-func.php"); require_once ("../../../bepl-taal-func.php"); require_once ("../../../smta-tlkd-func-0017.php"); require_once ("../../../mtsw-tabl.php"); require_once ("../../../tlkd-smts-func.php"); require_once ("../../../gram-rule-func.php"); // echo "NA REQUIRE BZV1 ".$invr_bzv1." FUNC ".$invr_func." VGPT ".$invr_vgpt." CORP ".$invr_corp; $userip = $_SERVER["REMOTE_ADDR"]; $datm=date("Y-m-d H:i:s", time()); $datm_itms=explode(" ",$datm); // print_r($datm_itms); echo "
"; ////////////// $lgroet=chbt_date("IT@1@2@".$invr_taal."@".$invr_bzkr); $curr_jaar=$lgroet[jaar]; // print_r($lgroet); $datm_hour=$lgroet[uur]; ///////// if ($datm_hour == 23 or $datm_hour == 0) { $invr_bzv2="Goede nacht Hoeft u nog niet naar bed? Heeft u nachtdienst"; } if ($datm_hour == 3 or $datm_hour == 4 ) { $invr_bzv2= "Goede nacht U bent er vroeg bij heeft u ochtenddienst"; } if ($datm_hour == 1 or $datm_hour == 2 ) { $invr_bzv2= "Goede nacht Het is tijd om te gaan slapen"; } if ($datm_hour ==5 or $datm_hour == 6 ) { $invr_bzv2= "Goede morgen effe p..n en dan weer terug of toch maar opblijven "; } if ($datm_hour ==7 or $datm_hour == 8) { $invr_bzv2= "Goede morgen Goed geslapen waar bestaat uw ontbijt uit"; } if ($datm_hour == 9 or $datm_hour == 10) { $invr_bzv2= "Goede morgen Een nieuwe dag met nieuwe kansen. Wat gaat u vandaag doen"; } if ($datm_hour == 11 or $datm_hour == 12 ) { $invr_bzv2= "Goede morgen Even volhouden nog en dan kunt u gaan lunchen"; } if ($datm_hour == 13 or $datm_hour == 14) { $invr_bzv2= "Goede middag Hoe was de lunch vandaag?"; } if ($datm_hour == 15 or $datm_hour == 16) { $invr_bzv2= "Goede middag heeft u al een kopje thee gehad?"; } if ($datm_hour == 17 or $datm_hour == 18) { $invr_bzv2 = "Goede avond bent u goed thuisgekomen heeft u al gegeten"; } if ($datm_hour == 19 or $datm_hour == 20) { $invr_bzv2 = "Goede avond Hoe was het nieuws nog spannende zaken?"; } if ($datm_hour == 21 or $datm_hour == 22 ) { $invr_bzv2= "Goede avond als u TV kijkt waar kijkt u dan naar"; } if ($invr_taal == "nederlands") { echo "
Het is rond ".$datm_hour." uur.
".$invr_bzv2."
"; } else { echo "
". $invr_bzv2."
"; } ///////////// // echo "INVR BZV2 ". $invr_bzv2; // require_once ("slct-tabl.php"); ////////////////// echo "
Bepaal taal van de invoer"; $taal_rslt=bepl_taal($invr_bzv1); // print_r($taal_rslt); krsort($taal_rslt); $taal_sw=0; foreach($taal_rslt as $taal_key => $taal_val) { if ($taal_sw == 0) { $taal_sw = 1; $text_taal=$taal_key; } } $invr_taal=$text_taal; if($invr_taal== null) { $invr_land="nederland"; $invr_taal="Nederlands"; } echo "
Taal is ".$invr_taal."
"; if ($invr_lgrm != null) { $invr_bzv1=$invr_lgrm; } ///////////// $bzv1_wrds=explode(" ",$invr_bzv1); // print_r($bzv1_wrds); foreach ($bzv1_wrds as $wrds_key => $wrds_val) { if (strlen($wrds_val) > 3) { $vrag_rslt=xtrt_xxxx($wrds_val,$invr_taal,"vrag"); { if (count($vrag_rslt) !=0) { // print_r($vrag_rslt); echo "
"; // echo "
".$wrds_val."
"; $sw=0; foreach ($vrag_rslt as $vrag_key => $vrag_val) { $vrag_itms=explode("!!",$vrag_key); if ($sw < 3) { // $vrag_itms=explode("!!",$vrag_key); // echo "
".$vrag_itms[4]."
"; $sw=$sw+1; } } } echo "
"; if (count($vrag_rslt) ==0) { $lwrds_val="
".$wrds_val."
"; echo "
Grammatica
".$lwrds_val. ".
"; } } } if (strlen($wrds_val) < 3) { $vrag_rslt=xtrt_xxxx($wrds_val,$invr_taal,"mtsw"); { if (count($vrag_rslt) !=0) { // print_r($vrag_rslt); echo "
"; echo "
"; foreach ($vrag_rslt as $vrag_key => $vrag_val) { $vrag_itms=explode("!!",$vrag_key); // echo "
".$vrag_itms[3]."
".$vrag_itms[4]."
"; } } echo "
"; echo "
"; if (count($vrag_rslt) ==0) { $shrt_array[$wrds_val]=$shrt_array[$wrds_val]+1; $lwrds_val="
".$wrds_val."
"; echo "
Er moet nog iets gebeuren voor
".$lwrds_val. ".
"; } } } } ///////////// echo "
"; echo "
".$invr_bzv1."
"; // echo "
BINNENGEKREGEN
"; // print_r($invr_bzv2); $bzv1_line=explode(".",$invr_bzv1); // echo "
Bewerk invoer en controleer grammaticale aanwezigheid."; echo "
"; $wiml_tabl=xtrt_aiml($invr_bzv1,$invr_taal,"wiml"); $invr_tabl="wiml"; // echo "
".$invr_tabl; // print_r($wiml_tabl); $invr_tabl="aiml"; // echo "
No direct response for
".$invr_bzv1."
"; // echo "
".$invr_tabl."Werkgeheugen
"; // echo "
".$invr_bzv1."
"; $aiml_tabl=xtrt_aiml($invr_bzv1,$invr_taal,"aiml"); // echo "
".$invr_tabl; // print_r($aiml_tabl); $aiml_rslt = array_merge($aiml_tabl, $wiml_tabl); if (count($aiml_rsltl) >0) { // echo "
Lange termijn geheugen
"; } ksort($aiml_rslt); $sw=0; echo "
"; foreach($aiml_rslt as $aiml_key => $aiml_val) { // echo "
AIML VAL ".$aiml_val."
AIML KEY ".$aiml_key."
"; $aiml_dtls=explode("@",$aiml_key); // print_r($aiml_dtls); $aiml_scre=$aiml_dtls[0]; $aiml_taal=$aiml_dtls[1]; $aiml_vgpt=$aiml_dtls[2]; $aiml_tpc1=$aiml_dtls[3]; $aiml_tpc2=$aiml_dtls[4]; $aiml_ptrn=$aiml_dtls[5]; $aiml_that=$aiml_dtls[6]; $aiml_tmpl=$aiml_dtls[7]; $aiml_corp=$aiml_dtls[8]; if ($aiml_tpc1 == null) { $aiml_tpc1="Onvolledig onderwerp.."; } if ($aiml_tmpl== null) { $aiml_tmpl="Onvolledig antwoord.."; } $aiml_array[$aiml_tpc1."!!".$aiml_tpc2."!!".$aiml_ptrn."!!".$aiml_tmpl."!!".$aiml_that]=$aiml_array[$aiml_tpc1."!!".$aiml_tpc2."!!".$aiml_ptrn."!!".$aiml_tmpl."!!".$aiml_that]+1; // echo "
SCRE ".$aiml_scre."
"; // echo "
TAAL ".$aiml_taal."
"; // echo "
VGPT ".$aiml_vgpt."
"; // echo "
".$aiml_tpc1."
"; // echo "
". $aiml_tpc2."
"; // echo "
".$aiml_ptrn."
"; // echo "
THAT ".$aiml_that."
"; if ($aiml_tmpl != null) { // echo "
". $aiml_tmpl."
"; } } ksort($aiml_array); // print_r($aiml_array); // echo "
CORP ".$aiml_corp."
"; echo ""; foreach($aiml_array as $aiml_key => $aiml_val) { // echo "
AIML KEY ".$aiml_key."
AIML VAL ".$aiml_val."
"; $aiml_dtls=explode("!!",$aiml_key); // print_r($aiml_dtls); $aiml_tpc1=$aiml_dtls[0]; $aiml_tpc2=$aiml_dtls[1]; $aiml_ptrn=$aiml_dtls[2]; $aiml_tmpl=$aiml_dtls[3]; $aiml_that=$aiml_dtls[4]; if ($sw==0) { $sw=1; echo "
".$aiml_that."--".$aiml_tpc1."--".$aiml_tpc2."
"; } if ($trelt != $aiml_ptrn) { echo "
".$aiml_ptrn."
"; $trelt=$aiml_ptrn; echo "
".$aiml_tmpl."--".$aiml_that."
"; echo "
"; ////////////////// $saiml_ptrn=str_replace(" ","+",$aiml_ptrn); // echo "
".$aiml_ptrn."
Verder vragen
"; echo "
Explore Semanta ...
".$aiml_ptrn."
"; // echo "
LINE VAL ".$line_val; $line_itms=explode(" ",$line_val); // echo"
LINE ITMS "; // print_r($line_itms); echo "
"; $mtsw_list=""; $shrt_list=""; $ln=0; foreach($line_itms as $itms_key => $itms_val) { // echo "
ITMS KEY ".$itms_key." ITMS VAL ".$itms_val."
"; if (strlen($itms_val) < 5) { $shrt_list=$shrt_list." ".$itms_val; } if (strlen($itms_val) > 4) { $mtsw_list[$itms_val]=$itms_val; $shrt_list=$shrt_list." x".$itms_val."x "; $ln=$ln+1; $gw27_rslt=xtrt_xxxx("xdotx".$itms_val,$invr_taal,"gw27"); // echo "
GW27 RSLT #".count($gw27_rslt); // print_r($gw27_rslt); if (count($gw27_rslt) == 0) { // echo "
ITMS KEY ".$itms_key." ITMS VAL ".$itms_val; $litms_val="
".$itms_val."
"; echo "
No grammatical characteristics for ".$litms_val."klik hier om grammatica kennis aan te leveren."; } if (count($gw27_rslt) > 0) { $long_wrds[$itms_val]=$line_val; $al=0; $tl=0; $gw27_rchs=""; foreach($gw27_rslt as $gw27_key => $gw27_val) { $gw27_dtls=explode("!!",$gw27_key); // print_r($gw27_dtls); $gw27_word=$gw27_dtls[3]; $gw27_gram=$gw27_dtls[4]; $gw27_rchs[$gw27_gram]=$gw27_rchs[$gw27_gram]+1; $gw27_conv=$conv_tabl[$gw27_gram]; $gw27_itms=explode("@",$gw27_conv); // print_r($gw27_rchs); $word_rslt=$gw27_itms[1]; $aiml_text=str_replace("invraiml",$gw27_word,$word_rslt); // echo "
Op zoek naar kennis in AIML TEXT ".$aiml_text; $aiml_rslt=xtrt_aiml($aiml_text,"wiml"); // print_r($aiml_rslt); foreach($aiml_rslt as $aiml_key => $aiml_val) { $aiml_dtls=explode("@",$aiml_key); // print_r($aiml_dtls); // echo "
AIML RSLT"; $aiml_ptrn=$aiml_dtls[3]; $aiml_tmpl=$aiml_dtls[4]; // $invr_bzv2[$invr_bzv1."@".$aiml_ptrn."@".$aiml_tmpl]=$invr_bzv2[$invr_bzv1."@".$aiml_ptrn."@".$aiml_tmpl]+1; // echo "
INVR BZV1 ".$invr_bzv1." AIML PTRN ".$aiml_ptrn." AIML TMPL ".$aiml_tmpl; } if ($aiml_text !=null and $tl < 1 ) { if ($lrelt== $itms_val and $aiml_text != $invr_bzv1) { if ($all <2) { $datm=date("Y-m-d H:i:s", time()); $invr_bzv2[$datm."@".$invr_bzv1."@".$itms_val."@".$aiml_text]=$invr_bzv2[$datm."@".$invr_bzv1."@".$itms_val."@".$aiml_text]+1; $al=$al+1; $tl=$tl+1; } } if ($lrelt!= $itms_val and $invr_bzv1 != $aiml_text) { $datm=date("Y-m-d H:i:s", time()); $invr_bzv2[$datm."@".$invr_bzv1."@".$itms_val."@".$aiml_text]=$invr_bzv2[$datm."@".$invr_bzv1."@".$itms_val."@".$aiml_text]+1; $lrelt=$itms_val; } } } echo "
".$gw27_word."
".$gw27_rchs."
"; // $gw27_rchs[$gw27_gram]=$gw27_rchs[$gw27_gram]+1; } } } } } /////////////// OK ///////////////////// // echo "
GW27 RCHS "; // print_r($gw27_rchs); // echo ""; // print_r($shrt_list); $shrt_itms=explode("x",$shrt_list); // print_r($shrt_itms); echo "
"; $shrt_sgmt=bepl_sgmt($shrt_list); foreach($shrt_sgmt as $shrt_key => $shrt_val) { // echo "
SHRT SGMT ".$shrt_key."
"; } echo "
"; foreach($mtsw_list as $mtsw_key => $mtsw_val) { if ($mtsw_key != null) { // echo "
MTSW key".$mtsw-key."
"; $xsim_text="%".$mtsw_key."%"; $mtsw_val=trim($mtsw_val); $sqltref="SELECT * FROM mtsw where `lnks`like '$xsim_text' "; $trefresult = mysql_query($sqltref, $link); $tref_num = mysql_num_rows($trefresult); if ($tref_num == 0) { // echo "
".$line."--NO MATCHES FOUND CALL US on 31-162-313323
"; // exit; } // echo "
You can select your chatbot here by selecting his profession and get to know his or her knowledge."; $corp_sw="0"; $kd=0; // echo "
Semanta
Gesprekspartner
Corpus
Kennisdomein
"; // echo "
SQLTREF ".$sqltref; echo "
Er zijn ".$tref_num." metselwerk entries gevonden voor uw uiting ".$mtsw_val; while ($row = mysql_fetch_assoc($trefresult)) { $nr=$nr+1; $kd=$kd+1; $ipad=$row['ipad']; $taal=$row['taal']; $domn=$row['domn']; $domn=str_replace("+"," ",$domn); $lnks=$row['lnks']; $rchs=$row['rchs']; // echo "
XTRT XXXX FUNC RCHS ".$rchs; // echo "
".$lnks."--".$new_scre; $lnks=str_replace("+"," ",$lnks); $rchs=str_replace("+"," ",$rchs); /////////////////////////////////////////// $mtsw_rchs=$rchs; $mtsw_lnks=$lnks; $long_array[$mtsw_lnks."@".$mtsw_rchs]=$long_array[$mtsw_lnks."@".$mtsw_rchs]+1; echo "
MTSW LNKS ".$mtsw_lnks." MTSW RCHS ".urlencode($mtsw_rchs)." MTSW VAL ".urlencode($mtsw_val); } } } // print_r($long_array); ?>